Autogenerated HTML docs for v1.7.5.2-353-g5df3e 
diff --git a/RelNotes/1.7.6.txt b/RelNotes/1.7.6.txt index f5faf28..3d5ff4d 100644 --- a/RelNotes/1.7.6.txt +++ b/RelNotes/1.7.6.txt 
@@ -14,13 +14,29 @@  * Clean-up of the C part of i18n (but not l10n---please wait)  continues.   + * The scripting part of the codebase is getting prepared for i18n/l10n. +  * Processes spawned by "[alias] <name> = !process" in the configuration  can inspect GIT_PREFIX environment variable to learn where in the  working tree the original command was invoked.   + * A magic pathspec ":/" tells a command that limits its operation to + the current directory when ran from a subdirectory to work on the + entire working tree. In general, ":/path/to/file" would be relative + to the root of the working tree hierarchy. + + After "git reset --hard; edit Makefile; cd t/", "git add -u" would + be a no-op, but "git add -u :/" would add the updated contents of + the Makefile at the top level. If you want to name a path in the + current subdirectory whose unusual name begins with ":/", you can + name it by "./:/that/path" or by "\:/that/path". +  * "git blame" learned "--abbrev[=<n>]" option to control the minimum  number of hexdigits shown for commit object names.   + * "git blame" learned "--line-porcelain" that is less efficient but is + easier to parse. +  * Aborting "git commit --interactive" discards updates to the index  made during the interctive session.   @@ -50,6 +66,9 @@  "--show-notes" option. Unlike "--show-notes", "--notes=<ref>" does  not imply showing the default notes.   + * "git ls-remote" learned "--exit-code" option to consider it a + different kind of error when no remote ref to be shown. +  * "git merge" learned "-" as a short-hand for "the previous branch", just  like the way "git checkout -" works.   @@ -101,12 +120,21 @@  miscounted the length of the name it formatted.  (merge rg/copy-gecos-username later)   + * The single-key mode of "git add -p" was easily fooled into thinking + that it was told to add everthing ('a') when up-arrow was pressed by + mistake. + (merge tr/add-i-no-escape later) +  * "git cherry-pick -s resolve" failed to cherry-pick a root commit.  (merge jk/cherry-pick-root-with-resolve later)    * "git config" used to choke with an insanely long line.  (merge ef/maint-strbuf-init later)   + * "git diff --word-diff" misbehaved when diff.suppress-blank-empty was + in effect. + (merge jm/maint-diff-words-with-sbe later) +  * "git log --stdin path" with an input that has additional pathspec  used to corrupt memory.  (merge jc/maint-pathspec-stdin-and-cmdline later) @@ -119,5 +147,5 @@  ---  exec >/var/tmp/1  echo O=$(git describe master) -O=v1.7.5.1-339-g254fd97 +O=v1.7.5.2-352-g4961210  git shortlog --no-merges ^maint ^$O master 
diff --git a/blame-options.txt b/blame-options.txt index 16e3c68..e76195a 100644 --- a/blame-options.txt +++ b/blame-options.txt 
@@ -52,6 +52,11 @@  --porcelain:: 	Show in a format designed for machine consumption.   +--line-porcelain:: +	Show the porcelain format, but output commit information for +	each line, not just the first time a commit is referenced. +	Implies --porcelain. +  --incremental:: 	Show the result incrementally in a format designed for 	machine consumption. 
diff --git a/git-annotate.html b/git-annotate.html index c89394b..5109e8b 100644 --- a/git-annotate.html +++ b/git-annotate.html 
@@ -535,6 +535,16 @@  </p>   </dd>   <dt class="hdlist1">  +--line-porcelain  +</dt>  +<dd>  +<p>  + Show the porcelain format, but output commit information for  + each line, not just the first time a commit is referenced.  + Implies --porcelain.  +</p>  +</dd>  +<dt class="hdlist1">   --incremental   </dt>   <dd>  
diff --git a/git-blame.html b/git-blame.html index 338f893..91b34ab 100644 --- a/git-blame.html +++ b/git-blame.html 
@@ -551,6 +551,16 @@  </p>   </dd>   <dt class="hdlist1">  +--line-porcelain  +</dt>  +<dd>  +<p>  + Show the porcelain format, but output commit information for  + each line, not just the first time a commit is referenced.  + Implies --porcelain.  +</p>  +</dd>  +<dt class="hdlist1">   --incremental   </dt>   <dd>  @@ -786,6 +796,20 @@  <div class="paragraph"><p>The contents of the actual line is output after the above   header, prefixed by a TAB. This is to allow adding more   header elements later.</p></div>  +<div class="paragraph"><p>The porcelain format generally suppresses commit information that has  +already been seen. For example, two lines that are blamed to the same  +commit will both be shown, but the details for that commit will be shown  +only once. This is more efficient, but may require more state be kept by  +the reader. The <tt>--line-porcelain</tt> option can be used to output full  +commit information for each line, allowing simpler (but less efficient)  +usage like:</p></div>  +<div class="literalblock">  +<div class="content">  +<pre><tt># count the number of lines attributed to each author  +git blame --line-porcelain file |  +sed -n 's/^author //p' |  +sort | uniq -c | sort -rn</tt></pre>  +</div></div>   </div>   <h2 id="_specifying_ranges">SPECIFYING RANGES</h2>   <div class="sectionbody">  @@ -975,7 +999,7 @@  </div>   <div id="footer">   <div id="footer-text">  -Last updated 2011-04-27 21:09:28 UTC  +Last updated 2011-05-23 23:05:02 UTC   </div>   </div>   </body>  
diff --git a/git-blame.txt b/git-blame.txt index bb8edb4..9516914 100644 --- a/git-blame.txt +++ b/git-blame.txt 
@@ -105,6 +105,19 @@  header, prefixed by a TAB. This is to allow adding more  header elements later.   +The porcelain format generally suppresses commit information that has +already been seen. For example, two lines that are blamed to the same +commit will both be shown, but the details for that commit will be shown +only once. This is more efficient, but may require more state be kept by +the reader. The `--line-porcelain` option can be used to output full +commit information for each line, allowing simpler (but less efficient) +usage like: + +	# count the number of lines attributed to each author +	git blame --line-porcelain file | +	sed -n 's/^author //p' | +	sort | uniq -c | sort -rn +    SPECIFYING RANGES  ----------------- 
diff --git a/git-config.html b/git-config.html index 59c73b2..de0baf3 100644 --- a/git-config.html +++ b/git-config.html 
@@ -454,44 +454,50 @@  The default is to assume the config file of the current repository,   .git/config unless defined otherwise with GIT_DIR and GIT_CONFIG   (see <a href="#FILES">[FILES]</a>).</p></div>  -<div class="paragraph"><p>This command will fail if:</p></div>  +<div class="paragraph"><p>This command will fail (with exit code ret) if:</p></div>   <div class="olist arabic"><ol class="arabic">   <li>   <p>  -The config file is invalid,  +The config file is invalid (ret=3),   </p>   </li>   <li>   <p>  -Can not write to the config file,  +can not write to the config file (ret=4),   </p>   </li>   <li>   <p>  -no section was provided,  +no section or name was provided (ret=2),   </p>   </li>   <li>   <p>  -the section or key is invalid,  +the section or key is invalid (ret=1),   </p>   </li>   <li>   <p>  -you try to unset an option which does not exist,  +you try to unset an option which does not exist (ret=5),   </p>   </li>   <li>   <p>  -you try to unset/set an option for which multiple lines match, or  +you try to unset/set an option for which multiple lines match (ret=5),   </p>   </li>   <li>   <p>  -you use <em>--global</em> option without $HOME being properly set.  +you try to use an invalid regexp (ret=6), or  +</p>  +</li>  +<li>  +<p>  +you use <em>--global</em> option without $HOME being properly set (ret=128).   </p>   </li>   </ol></div>  +<div class="paragraph"><p>On success, the command returns the exit code 0.</p></div>   </div>   <h2 id="_options">OPTIONS</h2>   <div class="sectionbody">  @@ -4467,7 +4473,7 @@  </div>   <div id="footer">   <div id="footer-text">  -Last updated 2011-03-15 23:30:13 UTC  +Last updated 2011-05-23 23:05:02 UTC   </div>   </div>   </body>  
diff --git a/git-config.txt b/git-config.txt index 8804de3..e7ecf5d 100644 --- a/git-config.txt +++ b/git-config.txt 
@@ -50,16 +50,18 @@  .git/config unless defined otherwise with GIT_DIR and GIT_CONFIG  (see <<FILES>>).   -This command will fail if: +This command will fail (with exit code ret) if:   -. The config file is invalid, -. Can not write to the config file, -. no section was provided, -. the section or key is invalid, -. you try to unset an option which does not exist, -. you try to unset/set an option for which multiple lines match, or -. you use '--global' option without $HOME being properly set. +. The config file is invalid (ret=3), +. can not write to the config file (ret=4), +. no section or name was provided (ret=2), +. the section or key is invalid (ret=1), +. you try to unset an option which does not exist (ret=5), +. you try to unset/set an option for which multiple lines match (ret=5), +. you try to use an invalid regexp (ret=6), or +. you use '--global' option without $HOME being properly set (ret=128).   +On success, the command returns the exit code 0.    OPTIONS  ------- 
diff --git a/git-ls-remote.html b/git-ls-remote.html index 72b055d..ef76e41 100644 --- a/git-ls-remote.html +++ b/git-ls-remote.html 
@@ -416,7 +416,7 @@  <div class="sectionbody">   <div class="verseblock">   <div class="verseblock-content"><em>git ls-remote</em> [--heads] [--tags] [-u &lt;exec&gt; | --upload-pack &lt;exec&gt;]  - &lt;repository&gt; [&lt;refs&gt;&#8230;]</div>  + [--exit-code] &lt;repository&gt; [&lt;refs&gt;&#8230;]</div>   <div class="verseblock-attribution">   </div></div>   </div>  @@ -463,6 +463,17 @@  </p>   </dd>   <dt class="hdlist1">  +--exit-code  +</dt>  +<dd>  +<p>  + Exit with status "2" when no matching refs are found in the remote  + repository. Usually the command exits with status "0" to indicate  + it successfully talked with the remote repository, whether it  + found any matching refs.  +</p>  +</dd>  +<dt class="hdlist1">   &lt;repository&gt;   </dt>   <dd>  @@ -513,7 +524,7 @@  </div>   <div id="footer">   <div id="footer-text">  -Last updated 2011-03-15 23:30:14 UTC  +Last updated 2011-05-23 23:05:02 UTC   </div>   </div>   </body>  
diff --git a/git-ls-remote.txt b/git-ls-remote.txt index c3df8c0..7a9b86a 100644 --- a/git-ls-remote.txt +++ b/git-ls-remote.txt 
@@ -10,7 +10,7 @@  --------  [verse]  'git ls-remote' [--heads] [--tags] [-u <exec> | --upload-pack <exec>] - <repository> [<refs>...] + [--exit-code] <repository> [<refs>...]    DESCRIPTION  ----------- @@ -36,6 +36,12 @@ 	SSH and where the SSH daemon does not use the PATH configured by the 	user.   +--exit-code:: +	Exit with status "2" when no matching refs are found in the remote +	repository. Usually the command exits with status "0" to indicate +	it successfully talked with the remote repository, whether it +	found any matching refs. +  <repository>:: 	Location of the repository. The shorthand defined in 	$GIT_DIR/branches/ can be used. Use "." (dot) to list references in 
diff --git a/git-sh-i18n--envsubst.html b/git-sh-i18n--envsubst.html new file mode 100644 index 0000000..67b0c50 --- /dev/null +++ b/git-sh-i18n--envsubst.html 
@@ -0,0 +1,438 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"  + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">  +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">  +<head>  +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  +<meta name="generator" content="AsciiDoc 8.4.5" />  +<title>git-sh-i18n&#8212;envsubst(1)</title>  +<style type="text/css">  +/* Debug borders */  +p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {  +/*  + border: 1px solid red;  +*/  +}  +  +body {  + margin: 1em 5% 1em 5%;  +}  +  +a {  + color: blue;  + text-decoration: underline;  +}  +a:visited {  + color: fuchsia;  +}  +  +em {  + font-style: italic;  + color: navy;  +}  +  +strong {  + font-weight: bold;  + color: #083194;  +}  +  +tt {  + color: navy;  +}  +  +h1, h2, h3, h4, h5, h6 {  + color: #527bbd;  + font-family: sans-serif;  + margin-top: 1.2em;  + margin-bottom: 0.5em;  + line-height: 1.3;  +}  +  +h1, h2, h3 {  + border-bottom: 2px solid silver;  +}  +h2 {  + padding-top: 0.5em;  +}  +h3 {  + float: left;  +}  +h3 + * {  + clear: left;  +}  +  +div.sectionbody {  + font-family: serif;  + margin-left: 0;  +}  +  +hr {  + border: 1px solid silver;  +}  +  +p {  + margin-top: 0.5em;  + margin-bottom: 0.5em;  +}  +  +ul, ol, li > p {  + margin-top: 0;  +}  +  +pre {  + padding: 0;  + margin: 0;  +}  +  +span#author {  + color: #527bbd;  + font-family: sans-serif;  + font-weight: bold;  + font-size: 1.1em;  +}  +span#email {  +}  +span#revnumber, span#revdate, span#revremark {  + font-family: sans-serif;  +}  +  +div#footer {  + font-family: sans-serif;  + font-size: small;  + border-top: 2px solid silver;  + padding-top: 0.5em;  + margin-top: 4.0em;  +}  +div#footer-text {  + float: left;  + padding-bottom: 0.5em;  +}  +div#footer-badges {  + float: right;  + padding-bottom: 0.5em;  +}  +  +div#preamble {  + margin-top: 1.5em;  + margin-bottom: 1.5em;  +}  +div.tableblock, div.imageblock, div.exampleblock, div.verseblock,  +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,  +div.admonitionblock {  + margin-top: 1.5em;  + margin-bottom: 1.5em;  +}  +div.admonitionblock {  + margin-top: 2.5em;  + margin-bottom: 2.5em;  +}  +  +div.content { /* Block element content. */  + padding: 0;  +}  +  +/* Block element titles. */  +div.title, caption.title {  + color: #527bbd;  + font-family: sans-serif;  + font-weight: bold;  + text-align: left;  + margin-top: 1.0em;  + margin-bottom: 0.5em;  +}  +div.title + * {  + margin-top: 0;  +}  +  +td div.title:first-child {  + margin-top: 0.0em;  +}  +div.content div.title:first-child {  + margin-top: 0.0em;  +}  +div.content + div.title {  + margin-top: 0.0em;  +}  +  +div.sidebarblock > div.content {  + background: #ffffee;  + border: 1px solid silver;  + padding: 0.5em;  +}  +  +div.listingblock > div.content {  + border: 1px solid silver;  + background: #f4f4f4;  + padding: 0.5em;  +}  +  +div.quoteblock {  + padding-left: 2.0em;  + margin-right: 10%;  +}  +div.quoteblock > div.attribution {  + padding-top: 0.5em;  + text-align: right;  +}  +  +div.verseblock {  + padding-left: 2.0em;  + margin-right: 10%;  +}  +div.verseblock > div.content {  + white-space: pre;  +}  +div.verseblock > div.attribution {  + padding-top: 0.75em;  + text-align: left;  +}  +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */  +div.verseblock + div.attribution {  + text-align: left;  +}  +  +div.admonitionblock .icon {  + vertical-align: top;  + font-size: 1.1em;  + font-weight: bold;  + text-decoration: underline;  + color: #527bbd;  + padding-right: 0.5em;  +}  +div.admonitionblock td.content {  + padding-left: 0.5em;  + border-left: 2px solid silver;  +}  +  +div.exampleblock > div.content {  + border-left: 2px solid silver;  + padding: 0.5em;  +}  +  +div.imageblock div.content { padding-left: 0; }  +span.image img { border-style: none; }  +a.image:visited { color: white; }  +  +dl {  + margin-top: 0.8em;  + margin-bottom: 0.8em;  +}  +dt {  + margin-top: 0.5em;  + margin-bottom: 0;  + font-style: normal;  + color: navy;  +}  +dd > *:first-child {  + margin-top: 0.1em;  +}  +  +ul, ol {  + list-style-position: outside;  +}  +ol.arabic {  + list-style-type: decimal;  +}  +ol.loweralpha {  + list-style-type: lower-alpha;  +}  +ol.upperalpha {  + list-style-type: upper-alpha;  +}  +ol.lowerroman {  + list-style-type: lower-roman;  +}  +ol.upperroman {  + list-style-type: upper-roman;  +}  +  +div.compact ul, div.compact ol,  +div.compact p, div.compact p,  +div.compact div, div.compact div {  + margin-top: 0.1em;  + margin-bottom: 0.1em;  +}  +  +div.tableblock > table {  + border: 3px solid #527bbd;  +}  +thead {  + font-family: sans-serif;  + font-weight: bold;  +}  +tfoot {  + font-weight: bold;  +}  +td > div.verse {  + white-space: pre;  +}  +p.table {  + margin-top: 0;  +}  +/* Because the table frame attribute is overriden by CSS in most browsers. */  +div.tableblock > table[frame="void"] {  + border-style: none;  +}  +div.tableblock > table[frame="hsides"] {  + border-left-style: none;  + border-right-style: none;  +}  +div.tableblock > table[frame="vsides"] {  + border-top-style: none;  + border-bottom-style: none;  +}  +  +  +div.hdlist {  + margin-top: 0.8em;  + margin-bottom: 0.8em;  +}  +div.hdlist tr {  + padding-bottom: 15px;  +}  +dt.hdlist1.strong, td.hdlist1.strong {  + font-weight: bold;  +}  +td.hdlist1 {  + vertical-align: top;  + font-style: normal;  + padding-right: 0.8em;  + color: navy;  +}  +td.hdlist2 {  + vertical-align: top;  +}  +div.hdlist.compact tr {  + margin: 0;  + padding-bottom: 0;  +}  +  +.comment {  + background: yellow;  +}  +  +@media print {  + div#footer-badges { display: none; }  +}  +  +div#toctitle {  + color: #527bbd;  + font-family: sans-serif;  + font-size: 1.1em;  + font-weight: bold;  + margin-top: 1.0em;  + margin-bottom: 0.1em;  +}  +  +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {  + margin-top: 0;  + margin-bottom: 0;  +}  +div.toclevel2 {  + margin-left: 2em;  + font-size: 0.9em;  +}  +div.toclevel3 {  + margin-left: 4em;  + font-size: 0.9em;  +}  +div.toclevel4 {  + margin-left: 6em;  + font-size: 0.9em;  +}  +/* Overrides for manpage documents */  +h1 {  + padding-top: 0.5em;  + padding-bottom: 0.5em;  + border-top: 2px solid silver;  + border-bottom: 2px solid silver;  +}  +h2 {  + border-style: none;  +}  +div.sectionbody {  + margin-left: 5%;  +}  +  +@media print {  + div#toc { display: none; }  +}  +  +/* Workarounds for IE6's broken and incomplete CSS2. */  +  +div.sidebar-content {  + background: #ffffee;  + border: 1px solid silver;  + padding: 0.5em;  +}  +div.sidebar-title, div.image-title {  + color: #527bbd;  + font-family: sans-serif;  + font-weight: bold;  + margin-top: 0.0em;  + margin-bottom: 0.5em;  +}  +  +div.listingblock div.content {  + border: 1px solid silver;  + background: #f4f4f4;  + padding: 0.5em;  +}  +  +div.quoteblock-attribution {  + padding-top: 0.5em;  + text-align: right;  +}  +  +div.verseblock-content {  + white-space: pre;  +}  +div.verseblock-attribution {  + padding-top: 0.75em;  + text-align: left;  +}  +  +div.exampleblock-content {  + border-left: 2px solid silver;  + padding-left: 0.5em;  +}  +  +/* IE6 sets dynamically generated links as visited. */  +div#toc a:visited { color: blue; }  +</style>  +</head>  +<body>  +<div id="header">  +<h1>  +git-sh-i18n&#8212;envsubst(1) Manual Page  +</h1>  +<h2>NAME</h2>  +<div class="sectionbody">  +<p>git-sh-i18n--envsubst -  + Git's own envsubst(1) for i18n fallbacks  +</p>  +</div>  +</div>  +<h2 id="_description">DESCRIPTION</h2>  +<div class="sectionbody">  +<div class="paragraph"><p>This is not a command the end user would want to run. Ever.  +This documentation is meant for people who are studying the  +plumbing scripts and/or are writing new ones.</p></div>  +<div class="paragraph"><p>git-sh-i18n&#8212;envsubst is Git&#8217;s stripped-down copy of the GNU  +<tt>envsubst(1)</tt> program that comes with the GNU gettext package. It&#8217;s  +used internally by <a href="git-sh-i18n.html">git-sh-i18n(1)</a> to interpolate the variables  +passed to the the <tt>eval_gettext</tt> function.</p></div>  +<div class="paragraph"><p>No promises are made about the interface, or that this  +program won&#8217;t disappear without warning in the next version  +of Git. Don&#8217;t use it.</p></div>  +</div>  +<h2 id="_git">GIT</h2>  +<div class="sectionbody">  +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>  +</div>  +<div id="footer">  +<div id="footer-text">  +Last updated 2011-05-23 23:05:02 UTC  +</div>  +</div>  +</body>  +</html>  
diff --git a/git-sh-i18n--envsubst.txt b/git-sh-i18n--envsubst.txt new file mode 100644 index 0000000..f5bbf77 --- /dev/null +++ b/git-sh-i18n--envsubst.txt 
@@ -0,0 +1,26 @@ +git-sh-i18n--envsubst(1) +======================== + +NAME +---- +git-sh-i18n--envsubst - Git's own envsubst(1) for i18n fallbacks + +DESCRIPTION +----------- + +This is not a command the end user would want to run. Ever. +This documentation is meant for people who are studying the +plumbing scripts and/or are writing new ones. + +git-sh-i18n--envsubst is Git's stripped-down copy of the GNU +`envsubst(1)` program that comes with the GNU gettext package. It's +used internally by linkgit:git-sh-i18n[1] to interpolate the variables +passed to the the `eval_gettext` function. + +No promises are made about the interface, or that this +program won't disappear without warning in the next version +of Git. Don't use it. + +GIT +--- +Part of the linkgit:git[1] suite 
diff --git a/git-sh-i18n.html b/git-sh-i18n.html new file mode 100644 index 0000000..07a9aab --- /dev/null +++ b/git-sh-i18n.html 
@@ -0,0 +1,467 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"  + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">  +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">  +<head>  +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  +<meta name="generator" content="AsciiDoc 8.4.5" />  +<title>git-sh-i18n(1)</title>  +<style type="text/css">  +/* Debug borders */  +p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {  +/*  + border: 1px solid red;  +*/  +}  +  +body {  + margin: 1em 5% 1em 5%;  +}  +  +a {  + color: blue;  + text-decoration: underline;  +}  +a:visited {  + color: fuchsia;  +}  +  +em {  + font-style: italic;  + color: navy;  +}  +  +strong {  + font-weight: bold;  + color: #083194;  +}  +  +tt {  + color: navy;  +}  +  +h1, h2, h3, h4, h5, h6 {  + color: #527bbd;  + font-family: sans-serif;  + margin-top: 1.2em;  + margin-bottom: 0.5em;  + line-height: 1.3;  +}  +  +h1, h2, h3 {  + border-bottom: 2px solid silver;  +}  +h2 {  + padding-top: 0.5em;  +}  +h3 {  + float: left;  +}  +h3 + * {  + clear: left;  +}  +  +div.sectionbody {  + font-family: serif;  + margin-left: 0;  +}  +  +hr {  + border: 1px solid silver;  +}  +  +p {  + margin-top: 0.5em;  + margin-bottom: 0.5em;  +}  +  +ul, ol, li > p {  + margin-top: 0;  +}  +  +pre {  + padding: 0;  + margin: 0;  +}  +  +span#author {  + color: #527bbd;  + font-family: sans-serif;  + font-weight: bold;  + font-size: 1.1em;  +}  +span#email {  +}  +span#revnumber, span#revdate, span#revremark {  + font-family: sans-serif;  +}  +  +div#footer {  + font-family: sans-serif;  + font-size: small;  + border-top: 2px solid silver;  + padding-top: 0.5em;  + margin-top: 4.0em;  +}  +div#footer-text {  + float: left;  + padding-bottom: 0.5em;  +}  +div#footer-badges {  + float: right;  + padding-bottom: 0.5em;  +}  +  +div#preamble {  + margin-top: 1.5em;  + margin-bottom: 1.5em;  +}  +div.tableblock, div.imageblock, div.exampleblock, div.verseblock,  +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,  +div.admonitionblock {  + margin-top: 1.5em;  + margin-bottom: 1.5em;  +}  +div.admonitionblock {  + margin-top: 2.5em;  + margin-bottom: 2.5em;  +}  +  +div.content { /* Block element content. */  + padding: 0;  +}  +  +/* Block element titles. */  +div.title, caption.title {  + color: #527bbd;  + font-family: sans-serif;  + font-weight: bold;  + text-align: left;  + margin-top: 1.0em;  + margin-bottom: 0.5em;  +}  +div.title + * {  + margin-top: 0;  +}  +  +td div.title:first-child {  + margin-top: 0.0em;  +}  +div.content div.title:first-child {  + margin-top: 0.0em;  +}  +div.content + div.title {  + margin-top: 0.0em;  +}  +  +div.sidebarblock > div.content {  + background: #ffffee;  + border: 1px solid silver;  + padding: 0.5em;  +}  +  +div.listingblock > div.content {  + border: 1px solid silver;  + background: #f4f4f4;  + padding: 0.5em;  +}  +  +div.quoteblock {  + padding-left: 2.0em;  + margin-right: 10%;  +}  +div.quoteblock > div.attribution {  + padding-top: 0.5em;  + text-align: right;  +}  +  +div.verseblock {  + padding-left: 2.0em;  + margin-right: 10%;  +}  +div.verseblock > div.content {  + white-space: pre;  +}  +div.verseblock > div.attribution {  + padding-top: 0.75em;  + text-align: left;  +}  +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */  +div.verseblock + div.attribution {  + text-align: left;  +}  +  +div.admonitionblock .icon {  + vertical-align: top;  + font-size: 1.1em;  + font-weight: bold;  + text-decoration: underline;  + color: #527bbd;  + padding-right: 0.5em;  +}  +div.admonitionblock td.content {  + padding-left: 0.5em;  + border-left: 2px solid silver;  +}  +  +div.exampleblock > div.content {  + border-left: 2px solid silver;  + padding: 0.5em;  +}  +  +div.imageblock div.content { padding-left: 0; }  +span.image img { border-style: none; }  +a.image:visited { color: white; }  +  +dl {  + margin-top: 0.8em;  + margin-bottom: 0.8em;  +}  +dt {  + margin-top: 0.5em;  + margin-bottom: 0;  + font-style: normal;  + color: navy;  +}  +dd > *:first-child {  + margin-top: 0.1em;  +}  +  +ul, ol {  + list-style-position: outside;  +}  +ol.arabic {  + list-style-type: decimal;  +}  +ol.loweralpha {  + list-style-type: lower-alpha;  +}  +ol.upperalpha {  + list-style-type: upper-alpha;  +}  +ol.lowerroman {  + list-style-type: lower-roman;  +}  +ol.upperroman {  + list-style-type: upper-roman;  +}  +  +div.compact ul, div.compact ol,  +div.compact p, div.compact p,  +div.compact div, div.compact div {  + margin-top: 0.1em;  + margin-bottom: 0.1em;  +}  +  +div.tableblock > table {  + border: 3px solid #527bbd;  +}  +thead {  + font-family: sans-serif;  + font-weight: bold;  +}  +tfoot {  + font-weight: bold;  +}  +td > div.verse {  + white-space: pre;  +}  +p.table {  + margin-top: 0;  +}  +/* Because the table frame attribute is overriden by CSS in most browsers. */  +div.tableblock > table[frame="void"] {  + border-style: none;  +}  +div.tableblock > table[frame="hsides"] {  + border-left-style: none;  + border-right-style: none;  +}  +div.tableblock > table[frame="vsides"] {  + border-top-style: none;  + border-bottom-style: none;  +}  +  +  +div.hdlist {  + margin-top: 0.8em;  + margin-bottom: 0.8em;  +}  +div.hdlist tr {  + padding-bottom: 15px;  +}  +dt.hdlist1.strong, td.hdlist1.strong {  + font-weight: bold;  +}  +td.hdlist1 {  + vertical-align: top;  + font-style: normal;  + padding-right: 0.8em;  + color: navy;  +}  +td.hdlist2 {  + vertical-align: top;  +}  +div.hdlist.compact tr {  + margin: 0;  + padding-bottom: 0;  +}  +  +.comment {  + background: yellow;  +}  +  +@media print {  + div#footer-badges { display: none; }  +}  +  +div#toctitle {  + color: #527bbd;  + font-family: sans-serif;  + font-size: 1.1em;  + font-weight: bold;  + margin-top: 1.0em;  + margin-bottom: 0.1em;  +}  +  +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {  + margin-top: 0;  + margin-bottom: 0;  +}  +div.toclevel2 {  + margin-left: 2em;  + font-size: 0.9em;  +}  +div.toclevel3 {  + margin-left: 4em;  + font-size: 0.9em;  +}  +div.toclevel4 {  + margin-left: 6em;  + font-size: 0.9em;  +}  +/* Overrides for manpage documents */  +h1 {  + padding-top: 0.5em;  + padding-bottom: 0.5em;  + border-top: 2px solid silver;  + border-bottom: 2px solid silver;  +}  +h2 {  + border-style: none;  +}  +div.sectionbody {  + margin-left: 5%;  +}  +  +@media print {  + div#toc { display: none; }  +}  +  +/* Workarounds for IE6's broken and incomplete CSS2. */  +  +div.sidebar-content {  + background: #ffffee;  + border: 1px solid silver;  + padding: 0.5em;  +}  +div.sidebar-title, div.image-title {  + color: #527bbd;  + font-family: sans-serif;  + font-weight: bold;  + margin-top: 0.0em;  + margin-bottom: 0.5em;  +}  +  +div.listingblock div.content {  + border: 1px solid silver;  + background: #f4f4f4;  + padding: 0.5em;  +}  +  +div.quoteblock-attribution {  + padding-top: 0.5em;  + text-align: right;  +}  +  +div.verseblock-content {  + white-space: pre;  +}  +div.verseblock-attribution {  + padding-top: 0.75em;  + text-align: left;  +}  +  +div.exampleblock-content {  + border-left: 2px solid silver;  + padding-left: 0.5em;  +}  +  +/* IE6 sets dynamically generated links as visited. */  +div#toc a:visited { color: blue; }  +</style>  +</head>  +<body>  +<div id="header">  +<h1>  +git-sh-i18n(1) Manual Page  +</h1>  +<h2>NAME</h2>  +<div class="sectionbody">  +<p>git-sh-i18n -  + Git's i18n setup code for shell scripts  +</p>  +</div>  +</div>  +<h2 id="_synopsis">SYNOPSIS</h2>  +<div class="sectionbody">  +<div class="paragraph"><p><em>. "$(git --exec-path)/git-sh-i18n"</em></p></div>  +</div>  +<h2 id="_description">DESCRIPTION</h2>  +<div class="sectionbody">  +<div class="paragraph"><p>This is not a command the end user would want to run. Ever.  +This documentation is meant for people who are studying the  +Porcelain-ish scripts and/or are writing new ones.</p></div>  +<div class="paragraph"><p>The 'git sh-i18n scriptlet is designed to be sourced (using  +<tt>.</tt>) by Git&#8217;s porcelain programs implemented in shell  +script. It provides wrappers for the GNU <tt>gettext</tt> and  +<tt>eval_gettext</tt> functions accessible through the <tt>gettext.sh</tt>  +script, and provides pass-through fallbacks on systems  +without GNU gettext.</p></div>  +</div>  +<h2 id="_functions">FUNCTIONS</h2>  +<div class="sectionbody">  +<div class="dlist"><dl>  +<dt class="hdlist1">  +gettext  +</dt>  +<dd>  +<p>  + Currently a dummy fall-through function implemented as a wrapper  + around <tt>printf(1)</tt>. Will be replaced by a real gettext  + implementation in a later version.  +</p>  +</dd>  +<dt class="hdlist1">  +eval_gettext  +</dt>  +<dd>  +<p>  + Currently a dummy fall-through function implemented as a wrapper  + around <tt>printf(1)</tt> with variables expanded by the  + <a href="git-sh-i18n&#8212;envsubst.html">git-sh-i18n&#8212;envsubst(1)</a> helper. Will be replaced by a  + real gettext implementation in a later version.  +</p>  +</dd>  +</dl></div>  +</div>  +<h2 id="_git">GIT</h2>  +<div class="sectionbody">  +<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>  +</div>  +<div id="footer">  +<div id="footer-text">  +Last updated 2011-05-23 23:05:02 UTC  +</div>  +</div>  +</body>  +</html>  
diff --git a/git-sh-i18n.txt b/git-sh-i18n.txt new file mode 100644 index 0000000..3b1f7ac --- /dev/null +++ b/git-sh-i18n.txt 
@@ -0,0 +1,42 @@ +git-sh-i18n(1) +============== + +NAME +---- +git-sh-i18n - Git's i18n setup code for shell scripts + +SYNOPSIS +-------- +'. "$(git --exec-path)/git-sh-i18n"' + +DESCRIPTION +----------- + +This is not a command the end user would want to run. Ever. +This documentation is meant for people who are studying the +Porcelain-ish scripts and/or are writing new ones. + +The 'git sh-i18n scriptlet is designed to be sourced (using +`.`) by Git's porcelain programs implemented in shell +script. It provides wrappers for the GNU `gettext` and +`eval_gettext` functions accessible through the `gettext.sh` +script, and provides pass-through fallbacks on systems +without GNU gettext. + +FUNCTIONS +--------- + +gettext:: +	Currently a dummy fall-through function implemented as a wrapper +	around `printf(1)`. Will be replaced by a real gettext +	implementation in a later version. + +eval_gettext:: +	Currently a dummy fall-through function implemented as a wrapper +	around `printf(1)` with variables expanded by the +	linkgit:git-sh-i18n--envsubst[1] helper. Will be replaced by a +	real gettext implementation in a later version. + +GIT +--- +Part of the linkgit:git[1] suite 
diff --git a/gitglossary.html b/gitglossary.html index 335b015..1383355 100644 --- a/gitglossary.html +++ b/gitglossary.html 
@@ -919,7 +919,8 @@  Pattern used to specify paths.   </p>   <div class="paragraph"><p>Pathspecs are used on the command line of "git ls-files", "git  -ls-tree", "git grep", "git checkout", and many other commands to  +ls-tree", "git add", "git grep", "git diff", "git checkout",  +and many other commands to   limit the scope of operations to some subset of the tree or   worktree. See the documentation of each command for whether   paths are relative to the current directory or toplevel. The  @@ -949,6 +950,36 @@  including Documentation/chapter_1/figure_1.jpg.</p></div>   </li>   </ul></div>  +<div class="paragraph"><p>A pathspec that begins with a colon <tt>:</tt> has special meaning. In the  +short form, the leading colon <tt>:</tt> is followed by zero or more "magic  +signature" letters (which optionally is terminated by another colon <tt>:</tt>),  +and the remainder is the pattern to match against the path. The optional  +colon that terminates the "magic signature" can be omitted if the pattern  +begins with a character that cannot be a "magic signature" and is not a  +colon.</p></div>  +<div class="paragraph"><p>In the long form, the leading colon <tt>:</tt> is followed by a open  +parenthesis <tt>(</tt>, a comma-separated list of zero or more "magic words",  +and a close parentheses <tt>)</tt>, and the remainder is the pattern to match  +against the path.</p></div>  +<div class="paragraph"><p>The "magic signature" consists of an ASCII symbol that is not  +alphanumeric.</p></div>  +<div class="dlist"><dl>  +<dt class="hdlist1">  +top <tt>/</tt>  +</dt>  +<dd>  +<p>  + The magic word <tt>top</tt> (mnemonic: <tt>/</tt>) makes the pattern match  + from the root of the working tree, even when you are running  + the command from inside a subdirectory.  +</p>  +</dd>  +</dl></div>  +<div class="paragraph"><p>Currently only the slash <tt>/</tt> is recognized as the "magic signature",  +but it is envisioned that we will support more types of magic in later  +versions of git.</p></div>  +<div class="paragraph"><p>A pathspec with only a colon means "there is no pathspec". This form  +should not be combined with other pathspec.</p></div>   </dd>   <dt class="hdlist1">   <a id="def_parent"></a>parent  
diff --git a/glossary-content.txt b/glossary-content.txt index 33716a3..8f62d1a 100644 --- a/glossary-content.txt +++ b/glossary-content.txt 
@@ -277,7 +277,8 @@  Pattern used to specify paths.  +  Pathspecs are used on the command line of "git ls-files", "git -ls-tree", "git grep", "git checkout", and many other commands to +ls-tree", "git add", "git grep", "git diff", "git checkout", +and many other commands to  limit the scope of operations to some subset of the tree or  worktree. See the documentation of each command for whether  paths are relative to the current directory or toplevel. The @@ -296,6 +297,37 @@  in the Documentation subtree,  including Documentation/chapter_1/figure_1.jpg.   ++ +A pathspec that begins with a colon `:` has special meaning. In the +short form, the leading colon `:` is followed by zero or more "magic +signature" letters (which optionally is terminated by another colon `:`), +and the remainder is the pattern to match against the path. The optional +colon that terminates the "magic signature" can be omitted if the pattern +begins with a character that cannot be a "magic signature" and is not a +colon. ++ +In the long form, the leading colon `:` is followed by a open +parenthesis `(`, a comma-separated list of zero or more "magic words", +and a close parentheses `)`, and the remainder is the pattern to match +against the path. ++ +The "magic signature" consists of an ASCII symbol that is not +alphanumeric. ++ +-- +top `/`;; +	The magic word `top` (mnemonic: `/`) makes the pattern match +	from the root of the working tree, even when you are running +	the command from inside a subdirectory. +-- ++ +Currently only the slash `/` is recognized as the "magic signature", +but it is envisioned that we will support more types of magic in later +versions of git. ++ +A pathspec with only a colon means "there is no pathspec". This form +should not be combined with other pathspec. +  [[def_parent]]parent:: 	A <<def_commit_object,commit object>> contains a (possibly empty) list 	of the logical predecessor(s) in the line of development, i.e. its 
diff --git a/user-manual.html b/user-manual.html index f9e238b..2b9d07d 100644 --- a/user-manual.html +++ b/user-manual.html 
@@ -1,5 +1,5 @@  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User’s Manual (for version 1.5.3 or newer)</title><link rel="stylesheet" href="docbook-xsl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book" title="Git User’s Manual (for version 1.5.3 or newer)"><div class="titlepage"><div><div><h1 class="title"><a name="id315466"></a>Git User’s Manual (for version 1.5.3 or newer)</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#id315393"></a></span></dt><dt><span class="chapter"><a href="#repositories-and-branches">1. Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dd><dl><dt><span class="section"><a href="#understanding-reachability">Understanding history: commits, parents, and reachability</a></span></dt><dt><span class="section"><a href="#history-diagrams">Understanding history: History diagrams</a></span></dt><dt><span class="section"><a href="#what-is-a-branch">Understanding history: What is a branch?</a></span></dt></dl></dd><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-With-git-fetch">Updating a repository with git fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#exploring-git-history">2. Exploring git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#counting-commits-on-a-branch">Counting the number of commits on a branch</a></span></dt><dt><span class="section"><a href="#checking-for-equal-branches">Check whether two branches point at the same history</a></span></dt><dt><span class="section"><a href="#finding-tagged-descendants">Find first tagged version including a given fix</a></span></dt><dt><span class="section"><a href="#showing-commits-unique-to-a-branch">Showing commits unique to a given branch</a></span></dt><dt><span class="section"><a href="#making-a-release">Creating a changelog and tarball for a software release</a></span></dt><dt><span class="section"><a href="#Finding-commits-With-given-Content">Finding commits referencing a file with given content</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#Developing-With-git">3. Developing with git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dd><dl><dt><span class="section"><a href="#conflict-resolution">Getting conflict-resolution help during a merge</a></span></dt></dl></dd><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dd><dl><dt><span class="section"><a href="#reverting-a-commit">Fixing a mistake with a new commit</a></span></dt><dt><span class="section"><a href="#fixing-a-mistake-by-rewriting-history">Fixing a mistake by rewriting history</a></span></dt><dt><span class="section"><a href="#checkout-of-path">Checking out an old version of a file</a></span></dt><dt><span class="section"><a href="#interrupted-work">Temporarily setting aside work in progress</a></span></dt></dl></dd><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt><dd><dl><dt><span class="section"><a href="#checking-for-corruption">Checking the repository for corruption</a></span></dt><dt><span class="section"><a href="#recovering-lost-changes">Recovering lost changes</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sharing-development">4. Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-With-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#cleaning-up-history">5. Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-With-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="chapter"><a href="#advanced-branch-management">6. Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote-tracking branches</a></span></dt></dl></dd><dt><span class="chapter"><a href="#git-concepts">7. Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dd><dl><dt><span class="section"><a href="#commit-object">Commit Object</a></span></dt><dt><span class="section"><a href="#tree-object">Tree Object</a></span></dt><dt><span class="section"><a href="#blob-object">Blob Object</a></span></dt><dt><span class="section"><a href="#trust">Trust</a></span></dt><dt><span class="section"><a href="#tag-object">Tag Object</a></span></dt><dt><span class="section"><a href="#pack-files">How git stores objects efficiently: pack files</a></span></dt><dt><span class="section"><a href="#dangling-objects">Dangling objects</a></span></dt><dt><span class="section"><a href="#recovering-from-repository-corruption">Recovering from repository corruption</a></span></dt></dl></dd><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="chapter"><a href="#submodules">8. Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#_pitfalls_with_submodules">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="chapter"><a href="#low-level-operations">9. Low-level git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dd><dl><dt><span class="section"><a href="#working-directory-to-index">working directory → index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index → object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database → index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index → working directory</a></span></dt><dt><span class="section"><a href="#tying-it-all-together">Tying it all together</a></span></dt></dl></dd><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hacking-git">10. Hacking git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git’s source code</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">11. Git Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><div class="preface"><div class="titlepage"><div><div><h2 class="title"><a name="id315393"></a></h2></div></div></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User’s Manual (for version 1.5.3 or newer)</title><link rel="stylesheet" href="docbook-xsl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book" title="Git User’s Manual (for version 1.5.3 or newer)"><div class="titlepage"><div><div><h1 class="title"><a name="id505965"></a>Git User’s Manual (for version 1.5.3 or newer)</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#id505891"></a></span></dt><dt><span class="chapter"><a href="#repositories-and-branches">1. Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dd><dl><dt><span class="section"><a href="#understanding-reachability">Understanding history: commits, parents, and reachability</a></span></dt><dt><span class="section"><a href="#history-diagrams">Understanding history: History diagrams</a></span></dt><dt><span class="section"><a href="#what-is-a-branch">Understanding history: What is a branch?</a></span></dt></dl></dd><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-With-git-fetch">Updating a repository with git fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#exploring-git-history">2. Exploring git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#counting-commits-on-a-branch">Counting the number of commits on a branch</a></span></dt><dt><span class="section"><a href="#checking-for-equal-branches">Check whether two branches point at the same history</a></span></dt><dt><span class="section"><a href="#finding-tagged-descendants">Find first tagged version including a given fix</a></span></dt><dt><span class="section"><a href="#showing-commits-unique-to-a-branch">Showing commits unique to a given branch</a></span></dt><dt><span class="section"><a href="#making-a-release">Creating a changelog and tarball for a software release</a></span></dt><dt><span class="section"><a href="#Finding-commits-With-given-Content">Finding commits referencing a file with given content</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#Developing-With-git">3. Developing with git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dd><dl><dt><span class="section"><a href="#conflict-resolution">Getting conflict-resolution help during a merge</a></span></dt></dl></dd><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dd><dl><dt><span class="section"><a href="#reverting-a-commit">Fixing a mistake with a new commit</a></span></dt><dt><span class="section"><a href="#fixing-a-mistake-by-rewriting-history">Fixing a mistake by rewriting history</a></span></dt><dt><span class="section"><a href="#checkout-of-path">Checking out an old version of a file</a></span></dt><dt><span class="section"><a href="#interrupted-work">Temporarily setting aside work in progress</a></span></dt></dl></dd><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt><dd><dl><dt><span class="section"><a href="#checking-for-corruption">Checking the repository for corruption</a></span></dt><dt><span class="section"><a href="#recovering-lost-changes">Recovering lost changes</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sharing-development">4. Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-With-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#cleaning-up-history">5. Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-With-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="chapter"><a href="#advanced-branch-management">6. Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote-tracking branches</a></span></dt></dl></dd><dt><span class="chapter"><a href="#git-concepts">7. Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dd><dl><dt><span class="section"><a href="#commit-object">Commit Object</a></span></dt><dt><span class="section"><a href="#tree-object">Tree Object</a></span></dt><dt><span class="section"><a href="#blob-object">Blob Object</a></span></dt><dt><span class="section"><a href="#trust">Trust</a></span></dt><dt><span class="section"><a href="#tag-object">Tag Object</a></span></dt><dt><span class="section"><a href="#pack-files">How git stores objects efficiently: pack files</a></span></dt><dt><span class="section"><a href="#dangling-objects">Dangling objects</a></span></dt><dt><span class="section"><a href="#recovering-from-repository-corruption">Recovering from repository corruption</a></span></dt></dl></dd><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="chapter"><a href="#submodules">8. Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#_pitfalls_with_submodules">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="chapter"><a href="#low-level-operations">9. Low-level git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dd><dl><dt><span class="section"><a href="#working-directory-to-index">working directory → index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index → object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database → index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index → working directory</a></span></dt><dt><span class="section"><a href="#tying-it-all-together">Tying it all together</a></span></dt></dl></dd><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hacking-git">10. Hacking git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git’s source code</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">11. Git Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><div class="preface"><div class="titlepage"><div><div><h2 class="title"><a name="id505891"></a></h2></div></div></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX  command-line skills, but no previous knowledge of git.</p><p><a class="xref" href="#repositories-and-branches" title="Chapter 1. Repositories and Branches">Chapter 1, <i>Repositories and Branches</i></a> and <a class="xref" href="#exploring-git-history" title="Chapter 2. Exploring git history">Chapter 2, <i>Exploring git history</i></a> explain how  to fetch and study a project using git—read these chapters to learn how  to build and test a particular version of a software project, search for @@ -2210,7 +2210,8 @@  </span></dt><dd><p class="simpara">  Pattern used to specify paths.  </p><p class="simpara">Pathspecs are used on the command line of "git ls-files", "git -ls-tree", "git grep", "git checkout", and many other commands to +ls-tree", "git add", "git grep", "git diff", "git checkout", +and many other commands to  limit the scope of operations to some subset of the tree or  worktree. See the documentation of each command for whether  paths are relative to the current directory or toplevel. The @@ -2227,7 +2228,26 @@  in particular, <span class="emphasis"><em>*</em></span> and <span class="emphasis"><em>?</em></span> <span class="emphasis"><em>can</em></span> match directory separators.  </p><p class="simpara">For example, Documentation/*.jpg will match all .jpg files  in the Documentation subtree, -including Documentation/chapter_1/figure_1.jpg.</p></li></ul></div></dd><dt><span class="term"> +including Documentation/chapter_1/figure_1.jpg.</p></li></ul></div><p class="simpara">A pathspec that begins with a colon <code class="literal">:</code> has special meaning. In the +short form, the leading colon <code class="literal">:</code> is followed by zero or more "magic +signature" letters (which optionally is terminated by another colon <code class="literal">:</code>), +and the remainder is the pattern to match against the path. The optional +colon that terminates the "magic signature" can be omitted if the pattern +begins with a character that cannot be a "magic signature" and is not a +colon.</p><p class="simpara">In the long form, the leading colon <code class="literal">:</code> is followed by a open +parenthesis <code class="literal">(</code>, a comma-separated list of zero or more "magic words", +and a close parentheses <code class="literal">)</code>, and the remainder is the pattern to match +against the path.</p><p class="simpara">The "magic signature" consists of an ASCII symbol that is not +alphanumeric.</p><div class="variablelist"><dl><dt><span class="term"> +top <code class="literal">/</code> +</span></dt><dd> + The magic word <code class="literal">top</code> (mnemonic: <code class="literal">/</code>) makes the pattern match + from the root of the working tree, even when you are running + the command from inside a subdirectory. +</dd></dl></div><p class="simpara">Currently only the slash <code class="literal">/</code> is recognized as the "magic signature", +but it is envisioned that we will support more types of magic in later +versions of git.</p><p class="simpara">A pathspec with only a colon means "there is no pathspec". This form +should not be combined with other pathspec.</p></dd><dt><span class="term">  <a name="def_parent"></a>parent  </span></dt><dd>  A <a class="link" href="#def_commit_object">commit object</a> contains a (possibly empty) list